package com.htyy.yutao.toptab;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.htyy.yutao.myapplication1.CircleRefreshLayoute;
import com.htyy.yutao.myapplication1.Main3Activity;
import com.htyy.yutao.myapplication1.R;


/**
 * Created by Carson_Ho on 16/7/22.
 */
public class Fragment1 extends Fragment {
    private Button btn;
    private Button btn1;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater,
                             @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment1, container, false);
        initView(view);
        return view;


    }

    public void initView(View view){
        btn=(Button) view.findViewById(R.id.button);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =new Intent(getActivity(),Main3Activity.class);
                startActivity(intent);

            }
        });


        btn1=(Button) view.findViewById(R.id.gotocanvas);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =new Intent(getActivity(),CircleRefreshLayoute.class);
                startActivity(intent);

            }
        });
    }



}
